package com.kangdi.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kangdi.server.mapper.AdminRoleMapper;
import com.kangdi.server.pojo.AdminRole;
import com.kangdi.server.service.IAdminRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * InnoDB free: 7168 kB; (`adminId`) REFER `yeb/t_admin`(`id`) ON DELETE CASCADE; ( 服务实现类
 * </p>
 *
 * @author kangdi
 * @since 2022-10-04
 */
@Service
public class AdminRoleServiceImpl extends ServiceImpl<AdminRoleMapper, AdminRole> implements IAdminRoleService {
    @Autowired
    private AdminRoleMapper adminRoleMapper;

    /**
     * 添加操作员角色信息
     * @param adminId
     * @param roles
     * @return
     */
    @Override
    public int addRoles(Integer adminId, Integer[] roles) {
        return adminRoleMapper.addRoles(adminId,roles);
    }
}
